import java.util.Random;
import java.util.Scanner;

public class test {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        Random random = new Random();
        int RandomNum = random.nextInt(101);
        int n = 0;
        while (true){
            System.out.println("输入你要猜的数字：");
            n = scanner.nextInt();
            if(n < RandomNum){
                System.out.println("猜小了");
            } else if (n == RandomNum) {
                System.out.println("猜对了");
                break;
            }else {
                System.out.println("猜大了");
            }
        }
    }
}
